You are here: AgileShapes > Microsoft SPS > Excel Write

Excel Write

This AgileShape can be used to create and afterwards modify an Excel document based on an Excel template. The resultant document can be saved either to a SharePoint document library or to a directory path (local on the server or a shared folder).

 

NOTE: This AgileShape is a specialized sub-type of the AgilePart AgileShape. Refer to the documentation for the AgilePart AgileShape for additional information about the properties and behavior that this sub-type inherits from the AgilePart AgileShape. 

 

Design-Time Properties

NOTE: Since this AgileShape is a specialized sub-type of the AgilePart AgileShape, all of the standard properties supported by the AgilePart AgileShape are also supported by this AgileShape. Since they are already documented elsewhere, the standard AgilePart properties are not documented in this section. Refer to the documentation for the AgilePart AgileShape for information about the standard AgilePart properties. Additional design-time properties (other than the standard AgilePart properties) that are specific to this AgileShape are documented below.

 

Configuration

Excel Services URL (Required)

The URL of the Excel Service.

For example http://moss.litwareinc.com/_vti_bin/ExcelService.asmx This could include custom attributes like ${SharePointURL}${ExcelService}. Also schema XPaths can be added using the ellipsis button.

 

Runtime Template (Required)

The Excel template that will be used at run-time (either .xlsx or .xltx). This document will be copied to the location as defined by the Save To parameter. This could be custom attributes like ${SharePointURL}${RuntimeTemplateLibrary}${ExcelFilename}. Also schema XPaths can be added using the ellipsis button.

 

NOTE: This file should be equivalent to the Design-time Template file with the same named fields.

 

NOTE: This document should be located in either a SharePoint Doc Library or in a shared folder. Either way, this must be added to the Trusted file locations of the Excel Services (configured in SharePoint Central Administration - Shared Services):

 

 

 

 

Design Time Template (Required)

Excel template to use at design-time. This template document is loaded at design-time to get access to all the named fields in the Excel sheet for mapping purposes. It is not used at run-time.

 

NOTE: This file should be equivalent to the Run-time Template file with the same named fields. Also, while designing in Envision, the file should be accessible to the Process Designer from his/her PC via the Browse button.

 

Save To (Required)

The path and filename for saving the resulting Excel document. This can be in a SharePoint Doc library or in a directory path. This could also be an expression like ${SharePointURL}${ExcelDocLibrary}${ExcelFilename}. Also schema XPaths can be added using the ellipsis button.

 

Overwrite if Exists

Overwrite the Save To file if it already exists.

 

Mappings

In order to update the named fields in the Excel sheet, they need to be mapped to the process values here. The named fields appear in the list box on the right and can be mapped to, by selecting them first and then pressing the arrow button. Once a named field is in the mapping grid on the left, in order to map it to a process value, first select the row and then press the ellipsis button to select from the schema dialog for the process or type a custom attribute directly in the ProcessValue column. If the file in Design-time Template changes, then it is necessary to press the Refresh button to reload the named fields again.

 

NOTE: The value of the named field in the ExcelField column can be evaluated from a string containing a custom attribute, for example ${MyExcelField} or field${year}${month} or a schema XPath. For the latter, the XPath itself is parameterizable! (see notes below)

 

NOTE: The name of the custom attribute in the ProcessValue column can be drived from a string containing another custom attribute, for example ${MyCustomAttribute} or customattribute${year}${month} or a schema XPath. For the latter, the XPath itself is parameterizable! (see notes below)

 

NOTE: You can also use advance XPath expressions such as filtering. For example (XPATH)/my:myFields/my:field2[.>32] returns all items that match the filter (field2 > 32). In addition, you can combine XPath expressions and custom attributes like this: (XPATH)/my:myFields/my:field2[.>${myCustomAttribute}]

 

NOTE: If you have an XPath expression that returns more than one value, there is a feature for mapping them with a named field that is defined as a one-dimensional range in the Excel document. The AgilePart will fill the range with returned values from the XPath expression, but if the range does not contain enough cells for the number of values, it will not fill past the range of cells (in order to protect rest of the worksheet) and the remaining values will be simply discarded.